/**
 * Содержит класс {@link Router}
 */
package logic.pathelements;

import java.util.ArrayList;
import logic.connectors.NetworkInterface;

/**
 * Класс-маршрутизатор.
 * @author Alexey Akimov <frinatella@gmail.com>
 */
public class Router extends ActiveElement {

    /**
     * Constructor instances this router id, name and network interfaces according to its parameters
     * @param id this router id
     * @param name this router name
     * @param networkInterfacesCount this router network interfaces count
     */
    public Router(Integer id, String name, int networkInterfacesCount) throws Exception {
        super(id, name, networkInterfacesCount);
        RouterRecords = new ArrayList<RouterRecord>();
    }
    
    
    /**
     * switch connector to other active path element network interfaces correspondences
     */
    private ArrayList<RouterRecord> RouterRecords;

    /**
     * Adds new RouterRecord
     * @param RouterRecord record will be added
     */
    public void addRecord(RouterRecord RouterRecord) {
        RouterRecords.add(RouterRecord);
    }

    /**
     * Remove RouterRecord
     * @param RouterRecord record will be removed
     */
    public void removeRecord(RouterRecord RouterRecord) {
        RouterRecords.remove(RouterRecord);
    }

    /**
     * Getter
     * @return router network interface to other active path element network  interfaces correspondences
     */
    public ArrayList<RouterRecord> getRecords() {
        return RouterRecords;
    }
	
    @Override
    public double getTimeDelay() {
            return 7;
    }

    @Override
    public double getCosts() {
            return 14;
    }

    @Override
    public String getInfo() {
            return "This is route. It routes.";
    }

}
